home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
PASANS.ZIP
/
CH06_1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-02-04
|
736b
|
34 lines
(* Chapter 6 - Programming exercise 1 *)
program First_Array;
var Numbers : array[1..12] of integer;
Index : integer;
begin
for Index := 1 to 12 do
Numbers[Index] := Index + 200;
for Index := 1 to 12 do
Writeln('Element',Index:3,' has the value',Numbers[Index]:4);
end.
{ Result of execution
Element 1 has the value 201
Element 2 has the value 202
Element 3 has the value 203
Element 4 has the value 204
Element 5 has the value 205
Element 6 has the value 206
Element 7 has the value 207
Element 8 has the value 208
Element 9 has the value 209
Element 10 has the value 210
Element 11 has the value 211
Element 12 has the value 212
}